//
//  StatisticsUtil.m
//  Ugo
//
//  Created by Chongqing 642 on 12-12-26.
//  Copyright (c) 2012年 Ugo!642. All rights reserved.
//
//  Summary
//  封装应用数据统计API

#import "StatisticsUtil.h"
#import "MobClick.h"
#import "Config.h"
#import "UMFeedback.h"
#import "UMSocial.h"
#import "WXApi.h"

@implementation StatisticsUtil
@synthesize delegate = _delegate;

+ (void)start
{
    [MobClick startWithAppkey:_SYS_UMENG_APPKEY reportPolicy:(ReportPolicy) REALTIME channelId:nil];

    [MobClick setLogEnabled:YES];
    [UMFeedback checkWithAppkey:_SYS_UMENG_APPKEY];
    [UMSocialData setAppKey:_SYS_UMENG_APPKEY];
    [UMSocialData openLog:YES];
    [WXApi registerApp:WEI_XIN_ID];
    
    //打开新浪微博的SSO开关
    [UMSocialConfig setSupportSinaSSO:YES];

    //打开Qzone的SSO开关
//    [UMSocialConfig setSupportQzoneSSO:YES importClasses:@[[QQApiInterface class],[TencentOAuth class]]];
    
}

+ (void)beginLogPage:(NSString *)pageName
{
    [MobClick beginLogPageView:pageName];

}

+ (void)endLogPage:(NSString *)pageName
{
    [MobClick endLogPageView:pageName];

}

+ (void)logEvent:(NSString *)eventId
{
    [MobClick event:eventId];

}

+ (void)checkUpdateManualWithDelegate:(id)delegate andSelector:(SEL)selector
{
    [MobClick checkUpdateWithDelegate:delegate selector:selector];
}

@end
